package com.achieve.mqtt.service;

import com.achieve.mqtt.gateway.MqttGateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MqttMessageSender {
    @Autowired
    private MqttGateway mqttGateway;

    public void sendMsg(String topic, String payload) {
        mqttGateway.sendMsgToMqtt(topic, payload);
    }

    public void sendMsg(String topic, int qos, String payload) {
        mqttGateway.sendMsgToMqtt(topic, qos, payload);
    }
}
